<?php 
include ("../class/localtion.php");
$clslocal = new localtionpz();
if($_GET['idedit_local'] != "")
{
	$idedit_local = $_GET['idedit_local'];	
	$editdata = $clslocal->viewedlocaltion($idedit_local);
	}
	
	if($_POST['addok'] !="")
	{
		
		$updata = $clslocal->editdatalocal("'{$_POST['projectname']}'","'{$_POST['localtionname']}'","'{$_POST['addok']}'");	
		if(!$updata)
		{
			echo "<script>alert('Updates Fail')</script>";
			echo "<meta http-equiv='refresh' content='0;URL=viewlopz.php'>";
			}else{
			echo "<script>alert('Updates data Finish')</script>";
			echo "<meta http-equiv='refresh' content='0;URL=viewlopz.php'>";
			}
		
	}
	

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<form action="edit_local.php" method="post">
<input type="hidden" name="addok" value="<?php print $editdata['id_local'];?>"/>

<table>
<tr>
<td>Project :</td>
<td><input name="projectname" type="text"  value="<?php print $editdata['name_local']?>"/> <td>
</tr>
<tr>
<td>Location :</td>
<td><input name="localtionname" type="text" value="<?php print $editdata['project']?>"/> <td>
</tr>

<tr>
<td colspan="2" align="center"> <input name="Submit" type="submit" value="Submit" /> <td>
</tr>


</table>


</body>
</html>